<template>
	<view class="top-xh" :style="{ 'padding-top': platform === 'web' ? '30rpx' : '100rpx' }">
		<view class="pic">
			<image  @tap="goHome" src="https://kx.taipingkeji.com/upload/1/common/images/20231219/20231218101251170290877134037.png" style="width: 50rpx;" mode="widthFix"></image>
		</view>
		<view class="h2">
			{{headerTitle}}
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			headerTitle:String
		},
		data() {
			return {
				platform: ''
			}
		},
		created() {
			uni.getSystemInfo({
				success: (res) => {
					this.platform = res.uniPlatform;
					console.log('this.platform',this.platform)
				}
			});
		},
		methods:{
			goHome(){
				uni.redirectTo({
					url:'../index/index'
				})
			}
		}
	}
	
</script>

<style>
.top-xh {
	/* padding-top: 100rpx; */
	overflow: hidden;
	margin-bottom: 30rpx;
	background-color: #f6f6f6;
	}
.top-xh .pic {
	float: left;
	margin-left: 10rpx;
	margin-right: 10rpx; 
}
.top-xh .h2 {
	float: left;
	font-size: 38rpx;
	font-weight: bold;
}
</style>